package com.dao.lx;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.entity.Function;
import com.entity.Functionalclassify;

public interface FunctionDAO extends JpaRepository<Function, Long>{
	@Query("from Function f where f.functionIfdelete = 1")
	public Page<Function> findAllFunctionIfdelete(Pageable p);
	
	@Query("from Function f where f.functionIfdelete = 1 and f.functionName like %?1%")
	public Page<Function> findByFunctionName(String functionName, Pageable p);
	
	@Query("from Function f where f.functionIfdelete = 1 and f.functionalclassify like ?1")
	public Page<Function> findByFunctionalclassify(Functionalclassify functionalclassify, Pageable p);
}